const ejs = require("ejs");
const fs = require("fs");
const arr = ["唐僧", "孙悟空", "猪八戒", "沙僧"];
const html = fs.readFileSync("./index.html").toString();

// ejs.render(template, data, options)
const result = ejs.render(html, { arr });
console.log(result);
